package com.wjjm.spoonselling.service.impl;

import com.wjjm.spoonselling.dao.CommentDao;
import com.wjjm.spoonselling.pojo.Comment;
import com.wjjm.spoonselling.service.CommentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class CommentServiceImpl implements CommentService {

    @Autowired
    private CommentDao commentDao;

    @Override
    public List<Comment> selectAll(int commodityId) {
        List<Comment> comments = commentDao.selectAll(commodityId);
        return comments;
    }

    @Override
    public Boolean insert(Comment comment) {
        Boolean i = commentDao.insert(comment);
        return i;
    }
}
